import Vue from 'vue';
import VueRouter from 'vue-router'
import Home from '@/views/home.vue';
import Agreement from '@/views/agreement.vue';
import Login from '@/views/login.vue';
import Register from '@/views/register.vue';
import Articles from '@/views/articles/index.vue';
import ArticlesDetail from '@/views/articles/detail.vue';
import Person from '@/views/person/index.vue';
import PersonCV from '@/views/person/cv.vue';
import Repwd from '@/views/person/repwd.vue';
import Phone from '@/views/person/phone.vue';
import Invite from '@/views/person/invite.vue';
import ScoreLog from '@/views/person/score_log.vue';
import Truename from '@/views/person/true.vue';
import Feedback from '@/views/feedback.vue';
import About from '@/views/about.vue';
import Schools from '@/views/school/index.vue';
import School from '@/views/school/detail.vue';
Vue.use(VueRouter);
const routes = [
    // + --------------  登录注册 --------------
    { path: '/login', component: Login },
    { path: '/register', component: Register},
    { path: '/agreement', component: Agreement},
    // + ------------------------------------------

    // + --------------  首页 --------------
    { path: '/', component: Home,meta:{requireAuth:true}},
    { path: '/feedback', component: Feedback,meta:{requireAuth:true}},
    { path: '/about', component: About,meta:{requireAuth:true}},
    // + ------------------------------------------

    // + --------------  资讯 --------------
    { path: '/articles', component: Articles,meta:{requireAuth:true}},
    { path: '/article', component: ArticlesDetail,meta:{requireAuth:true}},
    // + ------------------------------------------

    // + --------------  个人中心 --------------
    { path: '/person', component: Person,meta:{requireAuth:true}},
    { path: '/person_cv', component: PersonCV,meta:{requireAuth:true}},
    { path: '/repwd', component: Repwd,meta:{requireAuth:true}},
    { path: '/phone', component: Phone,meta:{requireAuth:true}},
    { path: '/invite', component: Invite,meta:{requireAuth:true}},
    { path: '/truename', component: Truename,meta:{requireAuth:true}},
    { path: '/score_log', component: ScoreLog,meta:{requireAuth:true}},
    // + ------------------------------------------

    // + --------------  校区 --------------
    { path: '/schools', component: Schools,meta:{requireAuth:true}},
    { path: '/school', component: School,meta:{requireAuth:true}},
    // + ------------------------------------------
    
]

const router = new VueRouter({
    mode: 'history',
    routes: routes,
})
export default router;